home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
151-175
/
scopedisk168
/
asmmacros
/
am_02
/
createdir.i
< prev
next >
Wrap
Text File
|
1995-03-19
|
1KB
|
52 lines
NOLIST
CreateDir MACRO ; 19 Dec 88
*------------------------------; Start of CreateDir macro.
NOLIST
IFC '\2','I' ; If <PointerToDirName> is specified, then
LIST
; Put <PointerToDirName> in D1.
MOVE.L #\3,D1
NOLIST
IFEQ ReEntrant-1
LIST
ADD.L A5,D1
NOLIST
ENDC
ENDC
IFC '\2','D' ; If <DirName> is specified, then
LIST
; Make D1 point to the directory name string.
MOVE.L #\3.str,D1
NOLIST
IFND \3.str ; Unless it was previously defined,
LIST
SECTION DataSection,DATA ; The ASCII directory name string goes here.
\3.str:
DC.B '\3',0
CNOP 0,2
SECTION CodeSection,CODE
NOLIST
ENDC
ENDC
LIST
CallLib CreateDir,dos ; Call CreateDir to create the directory.
; Put the dir read lock at <DirLockName>.
NOLIST
IFEQ ReEntrant-1
LIST
DefDS \1,1
MOVE.L D0,\1(A5)
NOLIST
ENDC
IFNE ReEntrant-1
LIST
MOVE.L D0,\1
DS_BSS \1,1,.L
NOLIST
ENDC
LIST
TST.L D0 ; Make the zero flag indicate failure.
*------------------------------; End of CreateDir macro.
ENDM
LIST